@echo off
rem =============================================== BEGIN CONFIG====================================================
set MSBUILDPATH=%SystemRoot%\microsoft.net\framework\v4.0.30319
set builder="%MSBUILDPATH%\msbuild.exe"
rem =============================================== END CONFIG =====================================================

rem =============================================== BEGIN SOURCE BUILD =============================================

set builder="%MSBUILDPATH%\msbuild.exe"

rem echo Removing old assemblies...
rem rd "..\References\DreamDriven" /Q /S

echo Building Instrumentation...

call %builder% .\Instrumentation\Instrumentation.sln /p:Configuration=Release
if errorlevel 1 (
   goto exit
)

echo Building Object Model...

call %builder% .\ObjectModel\ObjectModel.sln /p:Configuration=Release
if errorlevel 1 (
   goto exit
)

echo Building Service Provider...

call %builder% .\ServiceProvider\ServiceProvider.sln /p:Configuration=Release
if errorlevel 1 (
   goto exit
)

echo Building Software Factory...

call %builder% .\SoftwareFactory\SoftwareFactory.sln /p:Configuration=Release
if errorlevel 1 (
   goto exit
)

:exit

if errorlevel 1 (
    echo Build failed
)
